/**
 * Created by zhangqingxi on 2017-04-28.
 */


var modelPath=ROOT_PATH+'/environmental/solidWaste/storageView/';

$(function () {

    var solidWasteId=$('#solidWasteId').val();
    var hazardousWasteCodeId=$('#hazardousWasteCodeId').val();
    $('#dataList').datagrid({
        url:modelPath+'findStorageSourceByParam.shtml',
        queryParams:{
            sort:'d.addTime',
            order:'desc',
            solidWasteId:solidWasteId,
            hazardousWasteCodeId:hazardousWasteCodeId
        },
        // idField:'id',
        fitColumns:true,
        pagination:true,
        rownumbers:true,
        singleSelect:true,
        sortOrder:true,
        striped:true,
        fit:true,
        columns:[[
            {field:'solidWasteTypeName',title:'固废类别',width:10,sortable:false},
            {field:'solidWasteName',title:'固废名称',width:10,sortable:false},
            {field:'hazardousWasteCode',title:'危废代码',width:10,sortable:false},
            {field:'vulgo',title:'俗称',width:10,sortable:false},
            {field:'number',title:'贮存数量(吨)',width:10,sortable:false},
            {field:'addUserName',title:'登记人',width:10,sortable:false},
            {field:'addDeptName',title:'登记部门',width:10,sortable:false},
            {field:'d.addTime',title:'登记时间',width:10,sortable:true,formatter:function (value,row,index) {
                return row.addTime;
            }},
            {field:'source',title:'贮存来源',width:10,sortable:false}
        ]]

    });





});